﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User.Master" AutoEventWireup="true"
    CodeBehind="TaskList.aspx.cs" Inherits="VirtualOrg.Web.FormTaskList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="DashboardContent" runat="server">
    <script type="text/javascript">
        function OpenCreateTaskWindow() {
            // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
            $("#dialog:ui-dialog").dialog("destroy");

            $("#dialogCreate").dialog({
                width: 760,
                modal: true
            });
        }
    </script>
    <div id="dialogCreate" title="Create Task" style="display: none;">
        <iframe src="../manage/CreateTaskPopup.aspx" width="100%" height="450px" frameborder="0">
        </iframe>
    </div>
    <table style="width: 100%">
        <tr>
            <td>
                <img alt="Create New" src="../images/new-icon.png" title="Create New Task" style="cursor: hand;"
                    id="createNew" onclick="OpenCreateTaskWindow();" />
                &nbsp;&nbsp;&nbsp;
                <asp:ImageButton ID="btnRefresh" AlternateText="Refresh" ToolTip="Refresh List" runat="server"
                    ImageUrl="~/images/refresh-icon.png" />&nbsp;&nbsp;&nbsp;
            </td>
            <td style="text-align: right;">
            </td>
            <td>
                <h4 id="lblSubTitle" runat="server">
                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="select_field ui-corner-all"
                        Style="float: right;" AutoPostBack="True" OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                        <asp:ListItem>Show All</asp:ListItem>
                        <asp:ListItem>All Active</asp:ListItem>
                        <asp:ListItem>All Closed</asp:ListItem>
                    </asp:DropDownList>
                </h4>
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <br />
                <h4>My Active Task</h4>
                <br />
                <asp:DataList ID="DataTaskList" runat="server" Width="100%">
                    <ItemTemplate>
                        <div style="width: 100%" class="ui-corner-all">
                            <img src="../images/Ok-icon.png" style="cursor:pointer;"/>
                            <%# DataBinder.Eval(Container.DataItem, "Title")%>
                        </div>
                        <hr style="border:1px dotted gray;" />
                    </ItemTemplate>
                </asp:DataList>
                <asp:GridView ID="GridTaskList" runat="server" AutoGenerateColumns="False" Width="100%">
                    <Columns>
                        <asp:TemplateField HeaderText="ID">
                            <ItemTemplate>
                                <a href='../manage/ViewTask.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "TaskID")%>'>
                                    <%# DataBinder.Eval(Container.DataItem, "TaskID")%></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Title" HeaderText="Title" ItemStyle-Width="200px" />
                        <asp:BoundField DataField="Activity" HeaderText="Activity" />
                        <asp:BoundField DataField="Area" HeaderText="Project" />
                        <asp:BoundField DataField="CreatedBy" HeaderText="Created By" />
                        <asp:BoundField DataField="Priority" HeaderText="Priority" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="imgDelete" runat="server" ImageUrl="~/images/delete-icon.png" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <RowStyle Font-Size="11px" HorizontalAlign="Center" />
                </asp:GridView>
            </td>
        </tr>
        <%-- <tr>
            <td colspan="3">
                <h4>
                    Task Filter
                </h4>
                <table style="height: 100px;">
                    <tr>
                        <td>
                            <label>
                                Activity:
                            </label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlActivity" runat="server" CssClass="select_field ui-corner-all">
                            </asp:DropDownList>
                        </td>
                        <td style="width: 10px;">
                        </td>
                        <td>
                            <label>
                                Assigned To:</label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlAssignedTo" runat="server" CssClass="select_field ui-corner-all">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <label>
                                Status:
                            </label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlStatus" runat="server" CssClass="select_field ui-corner-all">
                                <asp:ListItem>All</asp:ListItem>
                                <asp:ListItem>Open</asp:ListItem>
                                <asp:ListItem>Closed</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td style="width: 10px;">
                        </td>
                        <td>
                            <label>
                                Organization:
                            </label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlOrganization" runat="server" CssClass="select_field ui-corner-all">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td>
                        </td>
                        <td style="width: 20px;">
                        </td>
                        <td>
                        </td>
                        <td>
                            <asp:LinkButton ID="btnApplyFilter" runat="server" CssClass="link" Style="float: right;">Apply Filter</asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>--%>
    </table>
    <div style="vertical-align: middle;">
    </div>
</asp:Content>
